package org.balthie.demo.my.utils.clazz;

import org.openjdk.jol.info.ClassLayout;

public class ClassLayoutUtil {

	public static void printObject(Object o)
	{
		System.out.println();
		System.out.println("identityHashCode: "+System.identityHashCode(o));
		System.out.println(ClassLayout.parseInstance(o).toPrintable());
	}
	
	public static void printClass(Class<?> klass) 
	{
		System.out.println();
		System.out.println("identityHashCode: "+System.identityHashCode(klass));
		System.out.println(ClassLayout.parseInstance(klass).toPrintable());
	}
}
